// 记录等相关api
import request from "@/utils/request";
// 检测记录
export function getLog(data = {}) {
  return request({
    url: "log/getLog",
    method: "post",
    data,
  });
}
// 白名单
export function getWhite(data = {}) {
  return request({
    url: "white/getWhite",
    method: "post",
    data,
  });
}

// 删除白名单
export function remWhite(phone) {
  return request({
    url: `white/remove/${phone}`,
    method: "get",
  });
}
// 添加白名单
export function addWhite(phone) {
  return request({
    url: `white/add/${phone}`,
    method: "get",
  });
}

// ip加白，删除ip
export function removeWhiteIp(data = {}) {
  return request({
    url: "user/removeIp",
    method: "post",
    data,
  });
}
// 添加ip
export function addWhiteIp(data = {}) {
  return request({
    url: "user/setIp",
    method: "post",
    data,
  });
}

// 产品概览
export function getProduct(data = {}) {
  return request({
    url: "log/statistics",
    method: "post",
    data,
  });
}

// 获取规则配置
export function getConfig(data = {}) {
  return request({
    url: "config/getConfig",
    method: "post",
    data,
  });
}

// 添加规则配置
export function addConfig(data = {}) {
  return request({
    url: "config/addConfig",
    method: "post",
    data,
  });
}
// 删除规则配置
export function removeConfig(data = {}) {
  return request({
    url: "config/removeConfig",
    method: "post",
    data,
  });
}
// 修改规则配置
export function updateConfig(data = {}) {
  return request({
    url: "config/updateConfig",
    method: "post",
    data,
  });
}

// 手机号码
export function PhoneOne(phone) {
  return request({
    url: `phone/setRedis/${phone}`,
    method: "get",
  });
}
// 手机号码
export function PhoneTwo(phone) {
  return request({
    url: `phone/getRedis/${phone}`,
    method: "get",
  });
}